import { type RouteConfig, Layout } from '../helper';
import { lazy } from 'react';

const dashboard: RouteConfig = {
  path: '/',
  element: Layout,
  meta: {
    title: '控制面板',
    icon: 'home',
    sort: 1,
  },
  children: [
    {
      index: true,
      meta: {
        title: '分析页',
        sort: 1,
      },
      element: lazy(() => import('@/views/Dashboard/Analysis')),
    },
    {
      path: '/workplace',
      meta: {
        title: '工作台',
        affix: true,
        sort: 2,
      },
      children: [
        {
          index: true,
          meta: {
            title: '分析页211',
            sort: 1,
          },
          element: lazy(() => import('@/views/Dashboard/Analysis')),
        },
        {
          path: '/workplace/11',
          element: lazy(() => import('@/views/Dashboard/Workplace')),
          meta: {
            title: '工作台11221',
            affix: true,
            sort: 2,
          },
        },
      ],
    },
  ],
};

export default dashboard;
